package com.cg.big_event.config;
import com.cg.big_event.interceptor.LoginInterecptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import javax.annotation.Resource;
@Configuration
public class MyConfig implements WebMvcConfigurer {
    //注册拦截器
    @Resource
    private  LoginInterecptor loginInterecptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
       registry.addInterceptor(loginInterecptor).excludePathPatterns("/user/register","/user/login");
    }
}
